#include <stdio.h>
#include <stdlib.h>
void main()
{
    FILE *fp;
    int i = 0;
    char str[10][50];
    if ((fp = fopen("data3.txt", "r")) == NULL)
    {
        printf("%s open error!\n", "data3.txt");
        exit(1);
    }
    while (!feof(fp))
    {
        if(fgets(str[i], 50, fp) != NULL) break;
        printf("%s", str[i]);
        i++;
    }
    printf("\n");
    fclose(fp);
}